<template>
    <div >
      <div v-for="item in list">
        <p style="margin-left: 40px;margin-top: 20px;font-size: 20px;margin-bottom: 40px">订单详情</p>
        <el-form label-width="80px" >
          <el-form-item label="订单号">
            <el-input type="text" v-model="item.orderNo"></el-input>
          </el-form-item>
          <el-form-item label="创建时间" >
            <el-input type="text" v-model="item.createTime" ></el-input>
          </el-form-item>
          <el-form-item label="收件人">
            <el-input type="text" v-model="item.receiverName"></el-input>
          </el-form-item>
          <el-form-item label="订单状态">
            <el-input type="text" v-model="item.statusDesc"></el-input>
          </el-form-item>
          <el-form-item label="支付方式">
            <el-input type="text" v-model="item.paymentTypeDesc"></el-input>
          </el-form-item>
          <el-form-item label="订单金额">
            <el-input type="text" v-model="item.payment"></el-input>
          </el-form-item>
        </el-form>
        <el-table
          :data="item.orderItemVoList"
          border>
          <el-table-column
            prop="productImage"
            label="商品图片">
            <template slot-scope="data">
            <img style="width: 100%" :src="'http://img.happymmall.com/'+data.row.productImage" />
              </template>
          </el-table-column>

          <el-table-column
            prop="productName"
            label="商品信息">
          </el-table-column>
          <el-table-column
            prop="currentUnitPrice"
            label="单价">
          </el-table-column>
          <el-table-column
            prop="quantity"
            label="数量">
          </el-table-column>
          <el-table-column
            prop="totalPrice"
            label="合计">
          </el-table-column>
        </el-table>
      </div>
    </div>

</template>

<script>
  import {good} from "../../http/index.js";

  export default {
        name: "WordLook",
        data(){
          return{
                  list:[]
          }
        },
        mounted() {
          this.look()
        },
        methods:{
          async look(){
            var orderNo=this.$route.query.orderNo
            console.log(orderNo)
            const res =await good()
            console.log(res)
            // this.list=res.data.data.list
            var index =res.data.data.list.filter((v)=>{
              return orderNo==v.orderNo
            })
            this.list=index
            console.log(this.list)
          }
        }

  }
</script>

<style lang="scss" scoped>

</style>
